/**
 * 
 */
package com.scholarone.s1exporttool.common;

import java.util.EnumSet;

/**
 * @author prabz
 *
 */
public enum DataSource {
	PROD1(1), IMPL1(2), STAGE1(3), SNAP1(4);
	
	private int code;

    private DataSource(int code) {
         this.code = code;
    }	
    
    public int getCode() { return code; }

    public static DataSource get(int code) { 
    	 for(DataSource s : EnumSet.allOf(DataSource.class))
    		 if(s.getCode()==code)
    			 return s; 
    	 return null;
    }    
}
